<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta
      content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
      name="viewport"
    />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
    <link rel="stylesheet" href="./less/css/public.css" />
    <link rel="stylesheet" href="./less/css/public-item.css" />
    <!-- weback打包成cdn -->
    <link
      rel="stylesheet"
      href="./lib/swiper-5.2.0/package/css/swiper.min.css"
    />
    <style>
      .swiper-button-next,
      .swiper-button-prev {
        position: static;
        height: auto;
      }
    </style>
  </head>
  <body>
    <!-- logo -->
    <div class="logo" onclick="goPage('introductionPage')">
      <img src="./img/logo.png" alt="" />
    </div>
    <!-- 二维码 -->
    <div class="code">
      <div class="title">· 二维码 ·</div>
      <div class="qrCode">
        <img src="./img/QRcode.jpg" alt="" />
      </div>
    </div>
    <!-- 返回 -->
    <div class="back" onclick="backIndex()">
      <img src="./img/back.png" alt="" />
    </div>
    <!-- 主体内容 -->
    <div class="main">
      <div class="title">· 垃非社区 ·</div>
      <div class="content">
        <div class="swiper-container">
          <div class="swiper-wrapper"></div>
        </div>
      </div>
      <!-- 左右按钮 -->
      <div class="btn">
        <div class="btn-wrapper">
          <div class="swiper-button-prev left-btn">Left</div>
        </div>
        <div class="btn-wrapper">
          <div class="swiper-button-next right-btn">Right</div>
        </div>
      </div>
    </div>
    <script src="./js/public.js"></script>
    <script src="./lib//swiper-5.2.0/package/js/swiper.min.js"></script>
    <script src="./js/data/item4.js"></script>
    <script src="./lib/template.js"></script>
    <!-- 最好的两款模板引擎软件是:juicer(官方已经废弃了)和art-template -->
    <script id="getheros" type="text/template">
       {{ each list }}
       <div class="swiper-slide">
          <img src="{{$value}}" alt="" onclick="imagePreview(this, initSwiper)"/>
        </div>
      {{ /each}}
    </script>
    <script>
      var htnlStr = template('getheros', {
        list: list41
      })
      document.querySelector('.swiper-wrapper').innerHTML = htnlStr
    </script>
    <script>
      // 创建预览大图的html结构
      initBigImg()
      function initSwiper() {
        var mySwiper = new Swiper('.swiper-container', {
          slidesPerView: 2, // 设置slider容器能够同时显示的slides数量(carousel模式)。
          slidesPerColumn: 2,
          navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev'
          }
        })
      }
      initSwiper()
    </script>
  </body>
</html>
